package main.start;

import interfaces.menu.joinGame.gamesTable.GamesTableWidget;
import main.InitGame;
import networking.GameInfoCreator;

public class ClientStartPolicy extends StartPolicy {
		
	public ClientStartPolicy(String[] args) {
		super(args);
	}
	
	@Override
	public void performStart() {
		GameInfoCreator infoCreator = new GameInfoCreator();
		GamesTableWidget widget = infoCreator.createWidget(args[0]);
		if(widget != null) {
			InitGame.get().initNewGame(false, widget.getGameCycle());
		}
	}
}